const koa = require("koa");
const router = require("koa-router")();
const app = new koa();
const koabody = require("koa-body")
router.get("/search",async ctx=>{
    console.log(ctx.query);
    ctx.body={
        code:200,
        msg:"search"
    }
})
router.post("/login",async ctx=>{
    console.log(ctx.request.body);
    ctx.body={
        code:200,
        msg:"登陆"
    }
})
app.use(koabody())
app.use(router.routes())
app.listen(4000)